<?php

require_once(TEST_INTEGRATION_PATH . 'Taxes.php');

class TestOfTaxes extends UnitTestCase {
	
	private $taxes;
	
	function __construct() {
		$this->taxes = new Taxes;
	}

	function testShouldReturnTaxRate() {
		// STORE_ZONE should be 18
		$this->assertEqual($this->taxes->getTaxRate(1), (int)7);
	}
	
	function testShouldReturnTaxDescription() {
		$this->assertEqual($this->taxes->getTaxDescription(1, 223, 18), "FL TAX 7.0%");
	}
	
	function testShouldAddTax() {
		
		if ($this->taxes->getDisplayWithTax()) $testPrice = 301.99;
		else $testPrice = 299.00;
		
		$this->assertEqual($this->taxes->addTax(299.00, 1), (float)$testPrice);
	}
}

?>